﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="EquipmentsList.aspx.cs" Inherits="MedicalCare.Admin.EquipmentsList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <asp:HiddenField ID="hideOrderby" runat="server" />

 <%--Champion 2013/1/3--%>
 <asp:DataList ID="EquipmentList" runat="server" CellPadding="2" 
        onitemcommand="EquipmentList_ItemCommand">
                    <%--<AlternatingItemStyle BackColor="White" ForeColor="#284775" />--%>
                    <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <%--<ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />--%>
                    <HeaderTemplate>
                        <table cellpadding="2" cellspacing="0" border="0">
                            <tr>
                                <td style="width: 150px;display:none">
                                   Id
                                </td>
                                 <td style="width: 150px; text-align: center">
                                    SensorId
                                </td>
                                <td style="width: 150px; text-align: center">
                                    设备类型
                                </td>
                                <td style="width: 150px; text-align: center">
                                    设备名
                                </td>
                                <td style="width: 150px; text-align: center">
                                    型号
                                </td>
                                <td style="width: 150px; text-align: center">
                                    生产厂家
                                </td>
                                <%--Champion 2013/1/3--%>
                                <td style="width: 150px; text-align: center">
                                    操作
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table cellpadding="2" cellspacing="0" border="0">
                            <tr onmouseover="this.style.background ='#FFDEAD';" onmouseout="this.style.background ='#ffffff'">
                                <td style="width: 100px;display:none">
                                       <%# DataBinder.Eval(Container.DataItem, "Id")%>
                                </td>
                                <td style="width: 150px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "SensorId")%>
                                </td>
                                <td style="width: 150px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "EquipmentTypeName")%>
                                </td>
                                <td style="width: 150px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "EquipmentName")%>
                                </td>
                                  <td style="width: 150px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Model")%>
                                </td>
                                <td style="width: 150px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Manufacturer")%>
                                </td>
                                <%--Champion 2013/1/3--%>
                                <td style="width: 150px; text-align: center">
                                   <asp:Button ID="btEdit" runat="server"  CommandName="edit" Text="编辑"  CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id")%>' />
                                   <asp:Button ID="btDelete" runat="server"  CommandName="del" Text="删除" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id")%>' />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                </asp:DataList>
 <div>
                       <webdiyer:AspNetPager ID="pager1" runat="server" HorizontalAlign="left" 
                    CssClass="paginator"   CurrentPageButtonClass="cpb"
                     PrevPageText="上一页" NextPageText="下一页" NumericButtonTextFormatString=" {0} "
                    ShowBoxThreshold="2" PageSize="5" InputBoxClass="text2" TextAfterInputBox=""
                    PagingButtonStyle="" OnPageChanging="msgPager_PageChanging" 
                    ShowPageIndexBox="Always" SubmitButtonText="确定"
                    TextAfterPageIndexBox="页" TextBeforePageIndexBox="跳转至" 
                    CurrentPageButtonPosition="Center" ShowFirstLast="False" />
               </div>
 <asp:Button ID="btnAdd" runat="server" Text="添加新设备" onclick="btnAdd_Click" />

</asp:Content>
